﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace job
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            textBoxStatus.Text = e.Url.ToString() + " loaded";
            this.Close();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            var url = string.IsNullOrEmpty(textBoxUrl.Text) ? "http://ifs.ifunsoccer.com/IFSLive.aspx" : textBoxUrl.Text;
            webBrowser1.Navigate(url);
        }

        private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
        {
            textBoxStatus.Text = "Loading...";
        }

        private void buttonGo_Click(object sender, EventArgs e)
        {
            var url = string.IsNullOrEmpty(textBoxUrl.Text) ? "http://ifs.ifunsoccer.com/IFSLive.aspx" : textBoxUrl.Text;
            webBrowser1.Navigate(url);
        }
    }
}
